
public class asael {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		nodeList<Integer> n,m;
		n=random.createRadomIntList(7);
		m=random.recRndIntLst(10);
		System.out.println("1..7:\n"+n);
		System.out.println("1..10:\n"+m);
		//check
		nodeList<Integer> check = new nodeList<Integer>();
		System.out.println(check);
		check.insertInfoToEnd(7);
		System.out.println(check);
		//Solution 1.א
		nodeList<Integer> chain1 = new nodeList<Integer>(7);
		chain1.insertInfoToEnd(21);
		chain1.insertInfoToEnd(4);
		System.out.println("Solution 1.א:\n"+chain1);
		//solution 1.ב
		nodeList<Integer> chain2 = new nodeList<Integer>(1);
		int k=75;
		for (int i=2;i<=k;i++){
			chain2.insertInfoToEnd(i);
		}
		System.out.println("Solution 1ב:\n"+chain2);
		//solution 1.ג
		String[] arr = new String[4];
		arr[0] = "My";
		arr[1] = "name";
		arr[2] = "is";
		arr[3] = "Moshe";
		nodeList<String> chain3 = new nodeList<String>();
		for (int i=0;i<4;i++)
			chain3.insertInfoInIndex(arr[i], i);
		System.out.println("Solution 1.ג:\n"+chain3);
		//solution 2
		nodeList<Object> chain4=new nodeList<Object>();
		chain4.insertInfoInIndex(30,0);
		chain4.insertInfoToEnd("hello");
		chain4.insertInfoToEnd(5);
		chain4.insertInfoToEnd(4);
		System.out.println("Solution 2:\n"+chain4);
		//solution 3
		//the metod Node.Node(Node<T> toCopy)
		//solution 5
		//solution 8
		nodeList<Character> chain = new nodeList<Character>('k');
		for (int i=0;i<2;i++){
			chain.insertInfoToEnd('k');
		}
		for (int i=0;i<2;i++){
			chain.insertInfoToEnd('b');
		}
		chain.insertInfoToEnd('k');
		chain.insertInfoToEnd('z');
		for (int i=0;i<2;i++){
			chain.insertInfoToEnd('e');
		}
		chain.insertInfoToEnd('z');
		System.out.println("Solution 8:\n"+chain);
		nodeList.compressSequences(chain);
		System.out.println(chain);
		//solution 9
		//solution 11
		nodeList<Integer> chain11a= new nodeList<Integer>();
		nodeList<Integer> chain11b= new nodeList<Integer>();
		chain11a.insertInfoToEnd(3);
		chain11a.insertInfoToEnd(5);
		chain11a.insertInfoToEnd(6);
		chain11a.insertInfoToEnd(8);
		chain11a.insertInfoToEnd(10);
		chain11a.insertInfoToEnd(11);
		chain11a.insertInfoToEnd(12);
		chain11a.insertInfoToEnd(21);
		chain11a.insertInfoToEnd(23);
		chain11a.insertInfoToEnd(52);
		chain11a.insertInfoToEnd(78);
		chain11a.insertInfoToEnd(99);
		chain11b.insertInfoToEnd(2);
		chain11b.insertInfoToEnd(4);
		chain11b.insertInfoToEnd(7);
		chain11b.insertInfoToEnd(9);
		chain11b.insertInfoToEnd(13);
		chain11b.insertInfoToEnd(14);
		chain11b.insertInfoToEnd(17);
		chain11b.insertInfoToEnd(22);
		chain11b.insertInfoToEnd(29);
		chain11b.insertInfoToEnd(80);
		chain11b.insertInfoToEnd(94);
		System.out.println("Solution 11:\nchain11a:"+chain11a+"\nchain11b:"+chain11b);
		nodeList<Integer> merge = nodeList.mergeIntNodeList(chain11a, chain11b);
		System.out.println("merge is:"+merge);
	}

}
